//
//  ViewController.m
//  RuntimeSwizzle
//
//  Created by 张国梁 on 15/11/5.
//  Copyright © 2015年 CoderGL. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //  数组越界
    NSArray *testArray1 = @[@"0", @"1"];
    [testArray1 objectAtIndex:3];
    
    //  数组中放空值 或者替换的时候 越界 放空值
    NSMutableArray *testArray2 = [NSMutableArray array];
    NSObject *obj = nil;
    [testArray2 addObject:obj];
    [testArray2 replaceObjectAtIndex:3 withObject:obj];
    
    //  字典中放空值
    NSMutableDictionary *testDict1 = [NSMutableDictionary dictionary];
    [testDict1 setObject:obj forKey:obj];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
        
}

@end
